import java.util.ArrayList;

import java.util.List;
public class Main {
    public static void main(String[] args) {
        List<car> carlist=new ArrayList<car>();
        carlist.add(Buyer.getCarInstanceByType("奔驰"));
        carlist.add(Buyer.getCarInstanceByType("宝马"));
        carlist.add(Buyer.getCarInstanceByType("法拉利"));
        carlist.add(Buyer.getCarInstanceByType("法拉利"));
        carlist.add(Buyer.getCarInstanceByType("法拉利"));

        for (car currentFruit : carlist){
            System.out.println(currentFruit.showName());
        }
    }
}